//
//  UIView+Extension.h
//  MiaMind
//
//  Created by Vill on 2023/11/23.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

typedef void(^GestureActionBlock)(UIGestureRecognizer *gesture);

@interface UIView (Extension)

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat maxX;
@property (nonatomic, assign) CGFloat maxY;

/**
 添加点击事件
 @param block 回调
 */
- (void)addTapGestureWithBlock:(GestureActionBlock)block;

- (void)clipsCorners:(UIRectCorner)corners radius:(CGFloat)radius;

/**
 *  圆角处理 (需要给视图设置过Frame之后，才可以设置圆角)
 *
 *  @param radiu 要切掉的大小
 *  @param corner 要选择切掉的角
 */
- (void)setupRadiu:(CGFloat)radiu corner:(UIRectCorner)corner;

/**
*  圆角处理
*
*  @param radiu 要切掉的大小
*/
- (void)setupRadiu:(CGFloat)radiu;

@end

NS_ASSUME_NONNULL_END
